﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入数字a");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("请输入数字b");
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("请输入,+,-,*,/");
            string y = Console.ReadLine();
            Calculate calculate = new Calculate(a,b);
            switch (y)
            {
                case "+":
                    calculate = new jia(a,b);
                    
                    break;
                case "-":
                    calculate = new jian(a, b);

                    break;
                case "*":
                    calculate = new cheng(a, b);

                    break;
                case "/":
                    calculate = new chu(a, b);

                    break;


                default:
                    Console.WriteLine("输入错误");
                    break;

            }
            calculate.DisplayResult();
        }
    }
}
